<?php 
    namespace Home\Model;
    use Think\Model;
    class UserModel extends Model{
        //自动完成
        protected $_auto = array ( 
            array('uaddtime','time',1,'function'),  
      
        );
       
        //自动验证
        protected $_validate = array(
          array('name','require','名字不能为空',0,'regex',1),
          array('name','1,16','你有那么长的名字吗?',0,'length',1)
        );
    }